home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-13 | 2.8 KB | 153 lines | [TEXT/MMCC] |
- // CImporting.cp -- dialog methods
- // Created 01/01/95 12:01 PM by AppMaker
-
- #include "CImporting.h"
-
-
- #include <UReanimator.h>
- #include <LStream.h>
- #include <PP_Messages.h>
-
- #define PPob_ImportingID 202
- #define RidL_ImportingID 202
-
- //----------
- CImporting*
- CImporting::CreateImporting(
- LCommander *inSuperCommander)
- {
- return ((CImporting *)LWindow::CreateWindow(PPob_ImportingID, inSuperCommander));
- }
-
- //----------
- // This is the function you register with URegistrar to create a
- // CImporting from a resource
- CImporting*
- CImporting::CreateImportingStream(
- LStream *inStream)
- {
- return (new CImporting(inStream));
- }
-
- //----------
- // The default constructor does nothing.
- CImporting::CImporting()
- {
- }
-
- //----------
- // The read-from-stream constructor just reads a dialog object.
- CImporting::CImporting(
- LStream *inStream)
- : LDialogBox(inStream)
- {
- }
-
- //----------
- // The destructor does nothing.
- CImporting::~CImporting()
- {
- }
-
- //----------
- // This member function gets called once the containment hierarchy that contains
- // this pane has been built. It gives us a chance to get data members for
- // interesting subviews, and to do other operations now that our subviews exist.
- void
- CImporting::FinishCreateSelf()
- {
- LDialogBox::FinishCreateSelf();
-
- UReanimator::LinkListenerToControls(this, this, RidL_ImportingID);
- // the purpose is to "connect" self to whatever controls
- // that we want to "listen" to
-
- // any additional initialization for your dialog:
-
- }
-
- //----------
- void
- CImporting::ListenToMessage(
- MessageT inMessage,
- void *ioParam)
- {
- switch (inMessage) {
- case msg_OK:
- GetSuperCommander()->ProcessCommand(cmd_Importing, this);
- break;
-
- case msg_Cancel:
- DoClose();
- break;
- default:
- break;
- }
- }
-
-
- //----------
- Boolean
- CImporting::ObeyCommand(
- CommandT inCommand,
- void *ioParam)
- {
- Boolean cmdHandled = true;
-
- switch (inCommand) {
-
- // +++ Add cases here for the commands you handle
- // Remember to add same cases to FindCommandStatus below
- // to enable/disable the commands
-
- default:
- cmdHandled = LDialogBox::ObeyCommand(inCommand, ioParam);
- break;
- }
-
- return cmdHandled;
- }
-
- //----------
- void
- CImporting::FindCommandStatus(
- CommandT inCommand,
- Boolean &outEnabled,
- Boolean &outUsesMark,
- Char16 &outMark,
- Str255 outName)
- {
- outUsesMark = false;
-
- switch (inCommand) {
-
- // +++ Add cases here for the commands you handle
-
- default:
- LDialogBox::FindCommandStatus(inCommand, outEnabled,
- outUsesMark, outMark, outName);
- break;
- }
- }
-
- //----------
- Boolean
- CImporting::FocusDraw()
- {
- Boolean focused = LView::FocusDraw();
-
- if (focused) {
- AuxWinHandle awHndl;
- CTabHandle awCTable;
- ColorSpec contentSpec;
-
- GetAuxWin(GetMacPort(), &awHndl);
- awCTable = (**awHndl).awCTable;
- contentSpec = (**awCTable).ctTable [wContentColor]; // should search vs. index
- ::RGBBackColor(&contentSpec.rgb);
- }
-
- return focused;
- }
-
-